package com.wd.live.viewmodel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.wd.mylibrary_base.bean.CheckBean
import com.wd.mylibrary_base.utils.HttpUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

/**
 * 作者: 邢凌志
 * 时间: 2024/9/12
 * 描述:
 */
class MainViewModel : ViewModel() {
    var checkData=MutableLiveData<CheckBean>()

    fun getCheckData(userId:Int,sessionId:String){
        viewModelScope.launch(Dispatchers.IO) {
            checkData.postValue(HttpUtils.httpUtils.apiService.getCheck(userId,sessionId))
        }
    }
}